package com.manager.model;

import jakarta.persistence.*;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Entity
@Table(name="tb_scheduling_strategy")
public class SchedulingStrategy extends AllId{

    private String strategyName;

    private Integer strategyType;

    private BigDecimal cpuLimit;

    private BigDecimal memoryLimit;

    private BigDecimal diskLimit;

    private String decisionId;

    private String decisionName;

    private Integer scheduleType;

    private Integer hasEnable;

    private String corn;

    private String priority;

    private String containerIds;

    private List<SchedulingStrategyDockerContainer> schedulingStrategyDockerContainerList = new ArrayList<>();

    @OneToMany(fetch = FetchType.LAZY,orphanRemoval=true,mappedBy = "schedulingStrategy")
    public List<SchedulingStrategyDockerContainer> getSchedulingStrategyDockerContainerList() {
        return schedulingStrategyDockerContainerList;
    }

    public void setSchedulingStrategyDockerContainerList(List<SchedulingStrategyDockerContainer> schedulingStrategyDockerContainerList) {
        this.schedulingStrategyDockerContainerList = schedulingStrategyDockerContainerList;
    }

    public Integer getStrategyType() {
        return strategyType;
    }

    public void setStrategyType(Integer strategyType) {
        this.strategyType = strategyType;
    }

    public BigDecimal getCpuLimit() {
        return cpuLimit;
    }

    public void setCpuLimit(BigDecimal cpuLimit) {
        this.cpuLimit = cpuLimit;
    }

    public BigDecimal getMemoryLimit() {
        return memoryLimit;
    }

    public void setMemoryLimit(BigDecimal memoryLimit) {
        this.memoryLimit = memoryLimit;
    }

    public BigDecimal getDiskLimit() {
        return diskLimit;
    }

    public void setDiskLimit(BigDecimal diskLimit) {
        this.diskLimit = diskLimit;
    }

    public String getDecisionId() {
        return decisionId;
    }

    public void setDecisionId(String decisionId) {
        this.decisionId = decisionId;
    }

    public String getDecisionName() {
        return decisionName;
    }

    public void setDecisionName(String decisionName) {
        this.decisionName = decisionName;
    }

    @Transient
    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }

    public Integer getScheduleType() {
        return scheduleType;
    }

    public void setScheduleType(Integer scheduleType) {
        this.scheduleType = scheduleType;
    }

    public String getCorn() {
        return corn;
    }

    public void setCorn(String corn) {
        this.corn = corn;
    }

    public String getStrategyName() {
        return strategyName;
    }

    public void setStrategyName(String strategyName) {
        this.strategyName = strategyName;
    }

    public Integer getHasEnable() {
        return hasEnable;
    }

    public void setHasEnable(Integer hasEnable) {
        this.hasEnable = hasEnable;
    }

    @Transient
    public String getContainerIds() {
        return containerIds;
    }

    public void setContainerIds(String containerIds) {
        this.containerIds = containerIds;
    }
}
